<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

Route::get('testVerify', [\App\Http\Controllers\Api\Recruit\RecruitController::class, 'testVerify']);

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});

/*Route::get('test', function () {
    return 'api-test';
});*/

Route::get('token', [\App\Http\Controllers\Api\TokenController::class, 'getToken']);
Route::get('token/user', [\App\Http\Controllers\Api\TokenController::class, 'getUser']);

// 用户相关
Route::get('register', [\App\Http\Controllers\Api\User\UserController::class, 'register']);
Route::get('login', [\App\Http\Controllers\Api\User\UserController::class, 'login']);

// 收藏招工
Route::get('collect_recruit', [\App\Http\Controllers\Api\User\CollectController::class, 'collect']);
// 收藏招工列表
Route::get('collect_recruit_list', [\App\Http\Controllers\Api\User\CollectController::class, 'list']);

// 我的发布招工列表
Route::get('my_publish_recruit_list', [\App\Http\Controllers\Api\User\PublishController::class, 'list']);
// 编辑招工的状态
Route::get('edit_recruit_status', [\App\Http\Controllers\Api\User\PublishController::class, 'editRecruitStatus']);
// 编辑招工
Route::get('edit_recruit_info', [\App\Http\Controllers\Api\User\PublishController::class, 'editRecruitInfo']);

// 地图招工列表
Route::get('map/recruit_bubble', [\App\Http\Controllers\Api\Recruit\RecruitController::class, 'mapRecruitBubbles']);
// 点击地图上的地址气泡获取当前地址下的招工列表
Route::get('map/recruit_list/bubble', [\App\Http\Controllers\Api\Recruit\RecruitController::class, 'recruitListByBubble']);

// 发布招工
Route::post('publish_recruit', [\App\Http\Controllers\Api\Recruit\RecruitController::class, 'publishRecruit']);
// 招工详情
Route::get('recruit_detail', [\App\Http\Controllers\Api\Recruit\RecruitController::class, 'recruitDetail']);
// 发布招工详情
Route::get('publish_recruit_detail', [\App\Http\Controllers\Api\Recruit\RecruitController::class, 'publishRecruitDetail']);

// 投诉招工
Route::post('complaint_recruit', [\App\Http\Controllers\Api\Complaint\ComplaintController::class, 'complaint']);

Route::post('upload_work_picture', [\App\Http\Controllers\Api\Recruit\RecruitController::class, 'uploadFile']);

Route::get('recruit_categories', [\App\Http\Controllers\Api\Recruit\CategoryController::class, 'categories']);
Route::get('recruit_priority_category', [\App\Http\Controllers\Api\Recruit\CategoryController::class, 'priorityCategory']);

// 个人实名验证
Route::post('personal_verify', [\App\Http\Controllers\Api\User\VerifyController::class, 'personalVerify']);
// 企业实名认证
Route::post('business_verify', [\App\Http\Controllers\Api\User\VerifyController::class, 'businessVerify']);

// 处理城市数据
// Route::get('deal_city', [\App\Http\Controllers\Utils\DealDataController::class, 'dealCity']);
// 测试-上传图片
Route::post('upload_image', [\App\Http\Controllers\Api\Utils\DealDataController::class, 'uploadImage']);

// search 页面
Route::get('search_index', [\App\Http\Controllers\Api\Search\SearchController::class, 'index']);
// banner
Route::get('banners', [\App\Http\Controllers\Api\Search\SearchController::class, 'list']);

// 联系记录
Route::get('contact_recruit_list', [\App\Http\Controllers\Api\User\ContactController::class, 'list']);
Route::get('record_contact', [\App\Http\Controllers\Api\User\ContactController::class, 'recordContact']);
